maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=jsonnet-bundler
pkgver=0.6.0
pkgrel=0
pkgdesc="Jsonnet package manager"
url="https://github.com/jsonnet-bundler/jsonnet-bundler"
arch="all"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/jsonnet-bundler/jsonnet-bundler/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -o jb -ldflags "-X main.Version=v$pkgver" ./cmd/jb
}

check() {
	go test ./...
}

package() {
	install -Dm755 jb -t "$pkgdir"/usr/bin/
}

sha512sums="
d42d17350c2fb9dd9aa01b9992379e13170f301c3d72e55d422eedf7c70e089b791a98a05037fe822e45fd6745b7d9d0133d06d948d4b4d10062d047fc8cfaed  jsonnet-bundler-0.6.0.tar.gz
"
